#include <stdio.h>

void i_c_c()
{
    /*1149:	f3 0f 1e fa          	endbr64 
    114d:	55                   	push   %rbp
    114e:	48 89 e5             	mov    %rsp,%rbp
    1151:	48 83 ec 10          	sub    $0x10,%rsp
    1155:	c7 45 f8 d2 04 00 00 	movl   $0x4d2,-0x8(%rbp)
    115c:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)*/
		int a = 1234;
		int b = 0;

    /*1163:	8b 45 f8             	mov    -0x8(%rbp),%eax			// eax = 1234
    1166:	48 63 d0             	movslq %eax,%rdx				// rdx = 1234
    1169:	48 69 d2 d3 4d 62 10 	imul   $0x10624dd3,%rdx,%rdx	// rdx = 1234*274877907 =339199337238 = 0x4E F9DB 2316
																	// edx = 0xf9db2316
    1170:	48 c1 ea 20          	shr    $0x20,%rdx				// rdx = edx = 0x4E
    1174:	89 d1                	mov    %edx,%ecx				// ecx = 0x4E
    1176:	c1 f9 06             	sar    $0x6,%ecx				// ecx = 1	(2^38)/274877907 = 999.9999 = 1000
    1179:	99                   	cltd							// rdx = edx = 0
    117a:	29 d1                	sub    %edx,%ecx				// ecx = ecx-edx = 1-0 = 1
    117c:	89 ca                	mov    %ecx,%edx				// edx = 1
    117e:	69 d2 e8 03 00 00    	imul   $0x3e8,%edx,%edx			// edx = 1*1000 = 1000
    1184:	29 d0                	sub    %edx,%eax				// eax = 1234-1000 = 234
    1186:	89 45 fc             	mov    %eax,-0x4(%rbp)*/
		b = a % 1000;

    /*1189:	8b 45 fc             	mov    -0x4(%rbp),%eax			// 234
    118c:	89 c6                	mov    %eax,%esi
    118e:	48 8d 3d 6f 0e 00 00 	lea    0xe6f(%rip),%rdi        # 2004 <_IO_stdin_used+0x4>
    1195:	b8 00 00 00 00       	mov    $0x0,%eax
    119a:	e8 b1 fe ff ff       	callq  1050 <printf@plt>*/
		printf("%d\n", b);

    /*119f:	90                   	nop
    11a0:	c9                   	leaveq 
    11a1:	c3                   	retq   */
}

int main()
{
    /*11a2:	f3 0f 1e fa          	endbr64 
    11a6:	55                   	push   %rbp
    11a7:	48 89 e5             	mov    %rsp,%rbp
    11aa:	b8 00 00 00 00       	mov    $0x0,%eax
    11af:	e8 95 ff ff ff       	callq  1149 <i_c_c>*/
		i_c_c();

    /*11b4:	b8 00 00 00 00       	mov    $0x0,%eax
    11b9:	5d                   	pop    %rbp
    11ba:	c3                   	retq   
    11bb:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)*/
	
		return 0;
}
